﻿using DLog.Tools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DLog.Config
{
    public class StorageConfig
    {
        /// <summary>
        /// 通过键key得到对应配置的数据集的值
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static string GetAssembly(string key)
        {
            string xmlPath = System.AppDomain.CurrentDomain.BaseDirectory + "StorageConfig.xml";
            return XMLHelper.xmlDoc(xmlPath).SelectSingleNode("/StorageFactorys/parameter[@key='" + key + "']").Attributes["value"].Value;
        }
    }
}
